package cn.com.xxlibrary.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import cn.com.xxlibrary.dao.ISystemDao;
import cn.com.xxlibrary.orm.ManagerInfoBean;
import cn.com.xxlibrary.orm.SystemLogBean;
import cn.com.xxlibrary.service.ISystemService;
import cn.com.xxlibrary.util.UtilTools;

@Service
@Repository("systemService")
public class SystemServiceImpl implements ISystemService {

	@Resource
	private ISystemDao systemDao;

	@Override
	public void recordLog(String log, ManagerInfoBean operateManager, String IP) {
		SystemLogBean logBean = new SystemLogBean();
		logBean.setOperateDetails(log);
		logBean.setOperateManager(operateManager);
		logBean.setIP(IP);
		logBean.setSysLogTime(UtilTools.receiveNowTime());

		systemDao.recordLog(logBean, operateManager);
	}

	public ISystemDao getSystemDao() {
		return systemDao;
	}

	public void setSystemDao(ISystemDao systemDao) {
		this.systemDao = systemDao;
	}

}
